package com.hyh.shiyanshiguanli.mapper;

import com.hyh.shiyanshiguanli.domain.entity.ReagentDate;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author hyh
 * @version 1.0
 */
@Mapper
public interface ReagentDateMapper {
    @Insert("insert into reagent_data (lab_lesson_id, reagent_id, reagent, need_num)" +
            "values (#{labLessonId},#{reagentId},#{reagent},#{needNum})")
    void add(ReagentDate reagent);
    @Select("select * from reagent_data where lab_lesson_id = #{id}")
    List<ReagentDate> selectById(@Param("id")  Integer id);
}
